package com.flyan.game.motafx.event;

import com.flyan.game.motafx.core.event.BaseEvent;
import com.flyan.game.motafx.core.event.enums.EventTypeEnum;
import com.flyan.game.motafx.core.util.sound.SoundUtils;

/**
 * 播放音效事件
 *
 * @author flyan
 * @version 1.0
 * @email flyan_by_chenu@sina.com
 * @since 2025/2/11
 */
public class PlaySoundEvent extends BaseEvent {

    @Override
    public String type() {
        return EventTypeEnum.PLAY_SOUND.getCode();
    }

    @Override
    public void occur() {
        String name = properties.getStr("name");
        SoundUtils.play(name);
    }

}
